import qs from 'qs'
import request from './index'

// 获取首页轮播图的数据
export const getBannerApi = () => request.get('/banner?type=2')

// 获取热门推荐的数据
export const HotApi = () => request.get('/personalized?limit=8')

// 获取新碟上架的数据
export const NewApi = () => request.get('/album/newest')

// 获取歌手的数据
export const SongerApi=()=>request.get('/top/artists?offset=0&limit=5')

// 云音乐特色榜数据
export const BdApi=()=>request.get('/toplist/detail?offset=5limit=5')

// 我的音乐左边-歌单列表数据
export const reqUserPlayList = (uid) => request({ url: `/user/playlist?uid=${uid}`, method: 'GET' })

// 我的音乐右边-歌单详情数据
export const reqPlayList = (id, cookie) => request( `/playlist/detail?id=${id}&cookie=${cookie}`);

// 获取所有歌曲
export const reqAllList = (id) => request({ url: `/playlist/track/all?id=${id}`, method: 'GET' });

// 音乐播放功能
export const BfApi =(id)=>request.get(`/song/url?id=${id}`)

// 精品歌单标签列表
export const SongMenuApi = () => request.get('/playlist/highquality/tags');

// 获取各类歌单 
export const SongListApi = (params) => request.get(`/top/playlist?limit=50`, {params});

// 获取精品歌单 
export const HighqualityListApi = (params) => request.get(`/top/playlist/highquality?limit=50`, {params});

// 获取相关歌单推荐 
export const RelatedMenuListApi = (id) => request.get(`/related/playlist?id=${id}`);

// 获取推荐电台
export const DjprogramApi = () => request.get('/personalized/djprogram');

// 获取推荐mv
export const MvApi = () => request.get('/personalized/mv');

// 获取推荐节目
export const ProgramApi = () => request.get('/program/recommend');

// 获取节目排行榜
export const ProgramToplistApi = () => request.get('/dj/program/toplist?limit=10');

// 获取推荐新音乐
export const NewsongApi = () => request.get('/personalized/newsong');

// 获取热门歌手
export const HotArtistApi = () => request.get('/top/artists?offset=0&limit=30');

// 获取歌手榜
export const ArtistBangApi = () => request.get('/toplist/artist');

// 获取入驻歌手
export const SettleArtistApi = () => request.get('/artist/list');

// 获取各类歌手
export const ArtistListApi = (params) => request.get(`/artist/list?limit=100`, {params});

// 获取热门新碟
export const HotAlbumApi = () => request.get('/album/newest');

// 获取数字专辑
export const NumAlbumApi = () => request.get('/album/list?limit=10');

// 获取新碟上架
export const NewAlbumApi = (params) => request.get(`/top/album`, {params});

// 获取全部新碟
export const AlbumApi = (params) => request.get(`/album/new?limit=30`, {params});

// 获取歌单详情
export const MusicDetailApi = (id) => request.get(`/playlist/detail?id=${id}`);

// 获取歌单评价 
export const MusicCommentApi = (id) => request.get(`/comment/playlist?id=${id}`);

// 获取歌手详情
export const ArtistDetailApi = (id) => request.get(`/artist/detail?id=${id}`);

// 获取歌手热门作品 
export const HotSongApi = (id) => request.get(`/artists?id=${id}`);

// 获取歌手所有专辑 
export const ArtistAlbumApi = (id) => request.get(`/artist/album?id=${id}`);

// 获取歌手相关MV
export const ArtistMvApi = (id) => request.get(`/artist/mv?id=${id}`);

// 获取歌手艺人介绍
export const ArtistDescApi = (id) => request.get(`/artist/desc?id=${id}`);

// 获取MV播放地址
export const MvBfApi = (id) => request.get(`/mv/url?id=${id}`);

// 获取mv数据 
export const MvDtailApi = (id) => request.get(`/mv/detail?mvid=${id}`);

// 获取mv评价
export const MvCommentApi = (id) => request.get(`/comment/mv?id=${id}`);

// 获取相似Mv
export const SimiMvApi = (id) => request.get(`/simi/mv?mvid=${id}`);

// 获取视频播放地址
export const VideoBfApi = (id) => request.get(`/video/url?id=${id}`);

// 获取视频详情 
export const VideoDetailApi = (id) => request.get(`/video/detail?id=${id}`);

// 获取视频评论 
export const VideoCommentApi = (id) => request.get(`/comment/video?id=${id}`);

// 获取相关视频 
export const RelatedVideoApi = (id) => request.get(`/related/allvideo?id=${id}`);

// 获取专辑详情 
export const AlbumDetailApi = (id) => request.get(`/album?id=${id}`);

// 获取专辑评论 
export const AlbumCommentApi = (id) => request.get(`/comment/album?id=${id}`);

// 获取歌曲详情 
export const SongDetailApi = (id) => request.get(`/song/detail?ids=${id}`);

// 获取歌曲评价
export const SongCommentApi = (id) => request.get(`/comment/music?id=${id}`);

// 获取歌词 
export const LyricApi = (id) => request.get(`/lyric?id=${id}`);

// 获取相似音乐 
export const SimiSongApi = (id) => request.get(`/simi/song?id=${id}`);

// 获取用户详情
export const UserDetailApi = (id) => request.get(`/user/detail?uid=${id}`);

// 获取电台节目详情
export const ProgramDetailApi = (id) => request.get(`/dj/program/detail?id=${id}`);

// 获取电台节目评价
export const ProgramCommentApi = (id) => request.get(`/comment/dj?id=${id}`);

// 搜索单曲
export const SingleSearchApi = (keywords) => request.get(`/search?keywords=${keywords}&type=1`);

// 搜索歌手
export const ArtistSearchApi = (keywords) => request.get(`/search?keywords=${keywords}&type=100`);

// 搜索专辑
export const AlbumSearchApi = (keywords) => request.get(`/search?keywords=${keywords}&type=10`);

// 搜索视频
export const VideoSearchApi = (keywords) => request.get(`/search?keywords=${keywords}&type=1014`);

// 搜索歌单
export const PlaylistSearchApi = (keywords) => request.get(`/search?keywords=${keywords}&type=1000`);

// 搜索节目
export const DjRadioSearchApi = (keywords) => request.get(`/search?keywords=${keywords}&type=1009`);

// 搜索用户
export const UserSearchApi = (keywords) => request.get(`/search?keywords=${keywords}&type=1002`);

// 获取电台详情 
export const DjRadioDetailApi = (id) => request.get(`/dj/detail?rid=${id}`);

// 获取电台-新节目 
export const DjProgramApi = (id) => request.get(`/dj/program?rid=${id}&limit=100&asc=false`);

// 获取电台-旧节目 
export const DjProgramOldApi = (id) => request.get(`/dj/program?rid=${id}&limit=100&asc=true`);

// 获取用户电台
export const UserAudioApi = (id) => request.get(`/user/audio?uid=${id}`);

// 获取电台推荐
export const DjRecommendApi = () => request.get(`/dj/recommend`);

// 发送/删除评论
export const DetailViewApi = (params) => request.post(`/comment`, qs.stringify(params));

// 给评论点点赞
export const DetailLikeApi = (params) => request.post(`/comment/like`, qs.stringify(params));